﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
using Imaginecup.util.resourceMan;
using imaginecup.util;
using Imaginecup.sprite.particle;

namespace Imaginecup.sprite
{
    public class ParticleSprite:ISprite
    {
        private String m_TextureName;
        private IColorClass m_ColorClass; 

  
        public void SetTextureName(String name)
        {
            m_TextureName = name;
        }   

        public void SetColorClass( IColorClass colorClass )
        {
            m_ColorClass = colorClass;
        }

        public void Draw(SpriteBatch sb,  EntityInfo dest)
        {
            Texture2D texture = ResourceMan.GetResourceMan().GetTexture(m_TextureName);

            Color color = m_ColorClass.GetColor();

            sb.Begin();
            sb.Draw(texture, new Rectangle((int)dest.mPosition.X, (int)dest.mPosition.Y, (int)dest.mSize.X, (int)dest.mSize.Y), color);
            sb.End();
        }

        public void Release()
        {
        }
    }
}
